<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/static/style/style.css">
<script src="${pageContext.request.contextPath}/static/script/index.js"></script>
<script src="${pageContext.request.contextPath}/static/script/button.js"></script>
<script>
    	var helpMessage = '${helpMessage}';
    	function helpOnClick(){
    		alert(helpMessage);
    	}
</script>
<title>Login</title>
</head>
<body>
	<nav class="aho-top-bar aho-box-shadow-mid">
		<section class="main">
			<span><a href="${pageContext.request.contextPath}">OnlineBookStore</a></span>
		</section>
		<section class="toolbar">
			<a class="toolbar-action" onclick="helpOnClick()"> <span
				class="aho-icon aho-icon-help"></span>
			</a>
		</section>

	</nav>
	<main class="aho-container">
		<form class="login-form aho-box-shadow-sm" action="login"
			method="POST">
			<h2 style="margin-top: 5px;">${ loginTitle }</h2>
			<c:if test="${error != null}">
				<div class="aho-error-box">
					<span>${error}</span>
				</div>
			</c:if>
			<div class="aho-input-text">
				<label for="">用户名</label> <input type="text" name="nick">
				<svg xmlns="http://www.w3.org/2000/svg" class="aho-input-icon"
					height="24px" viewBox="0 0 24 24" width="24px" fill="#000000">
					<path d="M0 0h24v24H0V0z" fill="none" />
					<path
						d="M10.25 13c0 .69-.56 1.25-1.25 1.25S7.75 13.69 7.75 13s.56-1.25 1.25-1.25 1.25.56 1.25 1.25zM15 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm7 .25c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10zM10.66 4.12C12.06 6.44 14.6 8 17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12zM4.42 9.47c1.71-.97 3.03-2.55 3.66-4.44C6.37 6 5.05 7.58 4.42 9.47zM20 12c0-.78-.12-1.53-.33-2.24-.7.15-1.42.24-2.17.24-3.13 0-5.92-1.44-7.76-3.69C8.69 8.87 6.6 10.88 4 11.86c.01.04 0 .09 0 .14 0 4.41 3.59 8 8 8s8-3.59 8-8z" /></svg>
			</div>
			<br>
			<div class="aho-input-text">
				<label for="">密码</label> <input type="password" name="password">
			</div>
			<button class="bt aho-float-right">
				<div class="wave" style="left: auto;"></div>
				<div class="text">登录</div>
			</button>
			<div class="mid-banner">
				<a href="${pageContext.request.contextPath}/register">没有账号？点击注册>></a>
			</div>
			<input type="hidden" name="redirect" value="${redirect}">
		</form>
	</main>
</body>
</html>